package com.karina.visualization.chart.skins;

import com.karina.visualization.chart.client.Graphics;
import com.karina.visualization.chart.model.DataModel;

/**
 * 
 * The interface to draw the skin of the component which doing the real work on
 * Canvas component of HTML5
 * 
 * @author kenny li(kenny.zlee@gmail.com)
 * 
 */
public interface Skin<Model extends DataModel<?>> {

	void setData(Model data);

	Model getData();

	/**
	 * set the selector name which is used by its container and parent;
	 * 
	 * @param name
	 */
	void setSelectorName(String name);

	/**
	 * draw the component of this component
	 * 
	 * @param grahpics
	 */
	void draw(Graphics grahpics);

	/**
	 * cleanup the shape of current skin which can be used by container which to
	 * erase everything of current skin
	 * 
	 */
	void cleanup(Graphics graphics);

	/**
	 * Refresh the chart means to cleanup first and draw the chart again it can
	 * also be a series of action which play effect start from original
	 * position/color and to the final position/color
	 * 
	 * @param graphics
	 */
	void refresh(Graphics graphics);

	/**
	 * set the arpha of the class
	 * 
	 * @param arapha
	 */
	void setArapha(double arpha);

	/**
	 * set the width of line stroke
	 * 
	 * 
	 */
	void setLineWidth(double lineW);

}
